home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_jep_blowbridge.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  72 lines

  1. # Jones 3D Cog Script
  2. #
  3. # jep_blowbridge.cog
  4. #
  5. # Cog to destroy bridge.
  6. #
  7. #    [DS]
  8. #    borrowed explode info from [SXC & TRM] 
  9. #
  10. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  11. #
  12. # ===================================================================
  13.  
  14. symbols
  15.  
  16.     message    startup
  17.     message     entered
  18.  
  19.     thing       bridge0                           
  20.     thing       truck0
  21.     thing        expos
  22.     sector    blowtime
  23.     sound        explode_snd=gen_bazooka_fire.wav    local
  24.     int        blown=0                    local
  25.     int        i                        local
  26.     thing        fragment                    local
  27.     thing        dust                        local
  28.     template    dusttemp=dustcloud            local        
  29.     template    debris0=stoneshrapa            local         
  30.     template    debris1=stoneshrapb            local           
  31.     template    debris2=stoneshrapc            local         
  32.     template    debris3=stoneshrapa            local         
  33.     template    debris4=stoneshrapb            local
  34.     material    dustmat=gen_a4sfx_dustcloud.mat    local
  35.     
  36.  
  37.     thing        player                    local
  38.  
  39.  
  40. end
  41.  
  42. #----------------------------------------------------------------------
  43. code
  44. startup:
  45.     player=GetLocalPlayerThing(); 
  46.     return;
  47.  
  48. entered:
  49.     if(blown == 1) return;
  50.     {    
  51.     blown=1;
  52.     PlaySoundThing(explode_snd, expos, 1.0, 40.0, 80.0, 0);
  53.     for(i=0; i<40; i=i+1)                                                                        
  54.     {                                                                                                    
  55.     fragment = CreateThing(debris0[RandBetween(0, 4)], expos);                                 
  56.     SetThingVel(fragment, VectorScale(VectorAdd(RandVec(), '-0.5 -0.5 0.0'), 3));
  57.     SetThingRotVel(fragment, VectorScale(VectorAdd(RandVec(), '0.0 0.0 0.0'), 900.0));                    
  58.     }
  59. dust=CreateThing(dusttemp, expos);
  60. MaterialAnim(dustmat, 8.0, 0);
  61. AnimateSpriteSize(dust, '0.02 0.02 1.0', '3.0 3.0 0.0', 3.0);
  62.     DestroyThing(bridge0);
  63.       MoveToFrame(truck0, 3, 15);
  64.     WaitForStop(truck0);
  65.     DestroyThing(truck0);
  66.     sleep(3.0);
  67.     Destroything(dust);
  68.     }
  69.     return;
  70. end
  71.  
  72.